<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<h1>${pageTitle} list</h1>

<p>
<c:if test="${pageTitle == 'Project'}">
<a href="products.htm">&lt; Back to products</a>
</c:if>
</p>

<table border="1">
<tr>
    <th>Backlog</th>
</tr>
<c:forEach items="${backlogs}" var="p">
    <tr>
    <c:choose>
    <c:when test="${p.type == 'PRODUCT'}">
        <td><a href="projects.htm?productId=${p.objectId}">${p.type} ${p.objectId}: ${p.name}</a></td>
    </c:when>
    <c:when test="${p.type == 'PROJECT'}">
        <td><a href="projectReport.htm?id=${p.objectId}">${p.type} ${p.objectId}: ${p.name}</a></td>
        <%--<td><a href="iterations.htm?projectId=${p.objectId}">iterations</a></td> --%>
    </c:when>
    <c:otherwise>
        <td><a href="iteration.htm?id=${p.objectId}">${p.type} ${p.objectId}: ${p.name}</a></td>
    </c:otherwise>
    </c:choose>
    </tr>
</c:forEach>
</table>